package com.maoxs.conf;

import com.maoxs.bean.ShowManager;
import com.maoxs.bean.TestBean;
import com.maoxs.bean.test1;
import com.maoxs.bean.test2;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class conf {
    @Bean
    public TestBean testBean() {
        TestBean testBean = new TestBean();
        testBean.create("fulin");
        return testBean;
    }


    @Bean
    public test1 test1() {
        test1 t1 = new test1();
        t1.setTestBean(testBean());
        return t1;
    }

    @Bean
    public test2 test2() {
        test2 t2 = new test2();
        t2.setTestBean(testBean());
        return t2;
    }


}
